﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace GreenArrow
{
    class PickerStatusGetPoint : PickerStatus
    {
        public override void Init()
        {
            form.ImageBox.Cursor = form.cursorPoint;
        }
        public override void MouseClick(MouseEventArgs e)
        {
            form.result.Pt = new Point(e.X, e.Y);
            form.Close();
        }
        public override void KeyPress(KeyPressEventArgs e) {
            if (e.KeyChar == ' ') {
                ChangeStatus(new PickerStatusGetRect());
            }
            else if (e.KeyChar == 27) {
                form.result.Canceled = true;
                form.Close();
            }
        }
    }
}
